﻿namespace ZYCommon
{
    using System;
    using System.Collections;

    public class TableCol
    {
        private CellEditStyleConst intEditStyle = CellEditStyleConst.Default;
        private int intLeft = 0;
        private int intWidth = 40;
        private ArrayList myCells = new ArrayList();
        private ArrayList myDropDownListItems = new ArrayList();
        private TableControl myTable = null;
        public object Tag = null;

        public ArrayList Cells
        {
            get
            {
                return this.myCells;
            }
            set
            {
                this.myCells = value;
            }
        }

        public ArrayList DropDownListItems
        {
            get
            {
                return this.myDropDownListItems;
            }
        }

        public CellEditStyleConst EditStyle
        {
            get
            {
                return this.intEditStyle;
            }
            set
            {
                this.intEditStyle = value;
            }
        }

        public int Index
        {
            get
            {
                return this.myTable.Cols.IndexOf(this);
            }
        }

        public int Left
        {
            get
            {
                return this.intLeft;
            }
            set
            {
                this.intLeft = value;
            }
        }

        public int Right
        {
            get
            {
                return (this.intLeft + this.intWidth);
            }
        }

        public TableControl Table
        {
            get
            {
                return this.myTable;
            }
            set
            {
                this.myTable = value;
            }
        }

        public int Width
        {
            get
            {
                return this.intWidth;
            }
            set
            {
                this.intWidth = value;
            }
        }
    }
}

